home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 11 / develop Issue 11 code / The NetWork Project.sea / The NetWork Project / Examples (Sources) / TrivialLookUp.p < prev    next >
MacBinary  |  1992-07-15  |  5.0 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
1% dexvert Applause Picture (image/applausePicture) ext Unsupported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert MATLAB p-code (other/matlabPCode) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Jul 15 15:26:12 1992, modified Wed Jul 15 15:26:12 1992, creator 'MPS ', type ASCII, 4381 bytes "TrivialLookUp.p" , at 0x119d 495 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 54 72 69 76 69 61 | 6c 4c 6f 6f 6b 55 70 2e |..Trivia|lLookUp.|
|00000010| 70 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |p.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 11 1d 00 | 00 01 ef a6 8a 2c 54 a6 |........|.....,T.|
|00000060| 8a 2c 54 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.,T.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 95 07 00 00 |........|........|
|00000080| 7b 66 69 6c 65 20 54 72 | 69 76 69 61 6c 4c 6f 6f |{file Tr|ivialLoo|
|00000090| 6b 55 70 2e 20 54 68 69 | 73 20 69 73 20 61 20 73 |kUp. Thi|s is a s|
|000000a0| 61 6d 70 6c 65 20 69 6d | 70 6c 65 6d 65 6e 74 61 |ample im|plementa|
|000000b0| 74 69 6f 6e 20 66 6f 72 | 20 61 20 74 72 69 76 69 |tion for| a trivi|
|000000c0| 61 6c 20 6c 6f 6f 6b 2d | 75 70 20 73 79 73 74 65 |al look-|up syste|
|000000d0| 6d 2e 20 0d 49 6e 63 6c | 75 64 65 20 61 20 72 65 |m. .Incl|ude a re|
|000000e0| 66 65 72 65 6e 63 65 20 | 74 6f 20 74 68 69 73 20 |ference |to this |
|000000f0| 66 69 6c 65 20 61 6e 64 | 20 75 6e 69 74 20 69 6e |file and| unit in|
|00000100| 20 79 6f 75 72 20 22 75 | 73 65 73 22 20 63 6c 61 | your "u|ses" cla|
|00000110| 75 73 65 2c 20 63 6f 6d | 70 69 6c 65 20 61 6e 64 |use, com|pile and|
|00000120| 20 6c 69 6e 6b 20 0d 74 | 6f 20 54 72 69 76 69 61 | link .t|o Trivia|
|00000130| 6c 4c 6f 6f 6b 55 70 2e | 70 2e 6f 20 62 65 66 6f |lLookUp.|p.o befo|
|00000140| 72 65 20 6c 69 6e 6b 69 | 6e 67 20 74 6f 20 4e 65 |re linki|ng to Ne|
|00000150| 74 57 6f 72 6b 4c 69 62 | 2e 6f 2e 0d 0d 54 72 69 |tWorkLib|.o...Tri|
|00000160| 76 69 61 6c 20 73 6f 6c | 75 74 69 6f 6e 73 3a 20 |vial sol|utions: |
|00000170| 0d 09 52 65 67 69 73 74 | 65 72 3a 20 09 77 65 20 |..Regist|er: .we |
|00000180| 64 6f 20 6e 6f 74 20 72 | 65 67 69 73 74 65 72 20 |do not r|egister |
|00000190| 61 74 20 61 6c 6c 2e 20 | 48 65 6e 63 65 20 77 65 |at all. |Hence we|
|000001a0| 20 63 61 6e 20 6f 6e 6c | 79 20 62 65 20 61 64 64 | can onl|y be add|
|000001b0| 72 65 73 73 65 64 2c 20 | 69 66 20 61 20 6c 6f 63 |ressed, |if a loc|
|000001c0| 61 6c 20 4e 65 74 57 6f | 72 6b 0d 09 09 09 09 70 |al NetWo|rk.....p|
|000001d0| 72 6f 63 65 73 73 6f 72 | 20 6b 6e 6f 77 73 20 75 |rocessor| knows u|
|000001e0| 73 2e 0d 09 53 65 74 53 | 65 61 72 63 68 3a 20 09 |s...SetS|earch: .|
|000001f0| 77 65 20 6f 6e 6c 79 20 | 64 65 66 61 75 6c 74 20 |we only |default |
|00000200| 73 65 61 72 63 68 20 61 | 6c 6c 6f 77 65 64 2e 0d |search a|llowed..|
|00000210| 09 41 63 74 69 76 65 3a | 09 09 61 6c 77 61 79 73 |.Active:|..always|
|00000220| 20 63 6c 61 69 6d 20 74 | 72 75 65 2e 0d 09 52 61 | claim t|rue...Ra|
|00000230| 6e 64 6f 6d 3a 09 09 72 | 65 74 75 72 6e 20 62 72 |ndom:..r|eturn br|
|00000240| 6f 61 64 63 61 73 74 20 | 61 64 64 72 65 73 73 0d |oadcast |address.|
|00000250| 09 4e 65 78 74 3a 09 09 | 72 65 74 75 72 6e 20 6c |.Next:..|return l|
|00000260| 6f 63 61 6c 20 61 64 64 | 72 65 73 73 0d 09 7d 0d |ocal add|ress..}.|
|00000270| 0d 7b 20 09 a9 20 43 6f | 70 79 72 69 67 68 74 20 |.{ .. Co|pyright |
|00000280| 31 39 39 31 20 54 68 65 | 20 4e 65 74 57 6f 72 6b |1991 The| NetWork|
|00000290| 20 50 72 6f 6a 65 63 74 | 2c 20 53 74 61 74 4c 61 | Project|, StatLa|
|000002a0| 62 20 48 65 69 64 65 6c | 62 65 72 67 2e 20 20 20 |b Heidel|berg. |
|000002b0| 7d 0d 7b 20 09 a9 20 43 | 6f 70 79 72 69 67 68 74 |}.{ .. C|opyright|
|000002c0| 20 31 39 39 31 20 47 2e | 20 53 61 77 69 74 7a 6b | 1991 G.| Sawitzk|
|000002d0| 69 2c 20 48 65 69 64 65 | 6c 62 65 72 67 2e 20 20 |i, Heide|lberg. |
|000002e0| 20 7d 0d 0d 75 6e 69 74 | 20 4e 65 74 57 6f 72 6b | }..unit| NetWork|
|000002f0| 4c 6f 6f 6b 75 70 3b 0d | 0d 69 6e 74 65 72 66 61 |Lookup;.|.interfa|
|00000300| 63 65 0d 0d 7b 20 54 68 | 65 20 63 6f 6d 70 69 6c |ce..{ Th|e compil|
|00000310| 65 20 74 69 6d 65 20 76 | 61 72 69 61 62 6c 65 73 |e time v|ariables|
|00000320| 20 4e 6c 53 65 72 76 65 | 72 20 61 6e 64 20 4e 6c | NlServe|r and Nl|
|00000330| 43 6c 69 65 6e 74 20 61 | 72 65 20 6f 6e 6c 79 20 |Client a|re only |
|00000340| 69 6e 63 6c 75 64 65 64 | 20 74 6f 20 6d 61 6b 65 |included| to make|
|00000350| 0d 63 6f 6d 70 61 72 69 | 73 6f 6e 73 20 77 69 74 |.compari|sons wit|
|00000360| 68 20 66 75 6c 6c 20 69 | 6d 70 6c 65 6d 65 6e 74 |h full i|mplement|
|00000370| 61 74 69 6f 6e 73 20 65 | 61 73 69 65 72 7d 0d 7b |ations e|asier}.{|
|00000380| 20 75 73 65 20 22 70 61 | 73 63 61 6c 20 2d 64 20 | use "pa|scal -d |
|00000390| 4e 6c 53 65 72 76 65 72 | 3d 66 61 6c 73 65 22 20 |NlServer|=false" |
|000003a0| 69 66 20 79 6f 75 20 64 | 6f 6e ab 74 20 77 61 6e |if you d|on.t wan|
|000003b0| 74 20 74 6f 20 72 65 67 | 69 73 74 65 72 20 79 6f |t to reg|ister yo|
|000003c0| 75 72 20 6f 77 6e 20 6e | 61 6d 65 73 20 7d 0d 0d |ur own n|ames }..|
|000003d0| 7b 24 49 46 43 20 55 6e | 64 65 66 69 6e 65 64 20 |{$IFC Un|defined |
|000003e0| 4e 6c 53 65 72 76 65 72 | 7d 0d 7b 24 53 45 54 43 |NlServer|}.{$SETC|
|000003f0| 20 4e 6c 53 65 72 76 65 | 72 3a 3d 74 72 75 65 7d | NlServe|r:=true}|
|00000400| 0d 7b 24 45 4e 44 43 7d | 0d 0d 7b 20 75 73 65 20 |.{$ENDC}|..{ use |
|00000410| 22 70 61 73 63 61 6c 20 | 2d 64 20 4e 6c 43 6c 69 |"pascal |-d NlCli|
|00000420| 65 6e 74 3d 66 61 6c 73 | 65 22 20 69 66 20 79 6f |ent=fals|e" if yo|
|00000430| 75 20 64 6f 6e ab 74 20 | 77 61 6e 74 20 74 6f 20 |u don.t |want to |
|00000440| 6c 6f 6f 6b 20 66 6f 72 | 20 6f 74 68 65 72 20 70 |look for| other p|
|00000450| 72 6f 67 72 61 6d 73 20 | 7d 0d 0d 7b 24 49 46 43 |rograms |}..{$IFC|
|00000460| 20 55 6e 64 65 66 69 6e | 65 64 20 4e 6c 43 6c 69 | Undefin|ed NlCli|
|00000470| 65 6e 74 7d 0d 7b 24 53 | 45 54 43 20 4e 6c 43 6c |ent}.{$S|ETC NlCl|
|00000480| 69 65 6e 74 3a 3d 74 72 | 75 65 7d 0d 7b 24 45 4e |ient:=tr|ue}.{$EN|
|00000490| 44 43 7d 0d 0d 75 73 65 | 73 09 54 79 70 65 73 2c |DC}..use|s.Types,|
|000004a0| 0d 09 09 45 72 72 6f 72 | 73 2c 0d 09 09 4e 65 74 |...Error|s,...Net|
|000004b0| 57 6f 72 6b 3b 0d 0d 0d | 7b 24 49 46 43 20 55 4e |Work;...|{$IFC UN|
|000004c0| 44 45 46 49 4e 45 44 20 | 55 73 69 6e 67 41 70 70 |DEFINED |UsingApp|
|000004d0| 6c 65 74 61 6c 6b 7d 0d | 74 79 70 65 20 53 74 72 |letalk}.|type Str|
|000004e0| 33 32 20 3d 20 53 74 72 | 69 6e 67 20 5b 33 32 5d |32 = Str|ing [32]|
|000004f0| 3b 0d 7b 24 45 4e 44 43 | 7d 0d 0d 7b 09 3d 3d 3d |;.{$ENDC|}..{.===|
|00000500| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000510| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000520| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000530| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 09 7d 0d 0d 7b 09 |========|==.}..{.|
|00000540| 6e 61 6d 65 20 6c 6f 6f | 6b 75 70 20 2d 20 69 64 |name loo|kup - id|
|00000550| 65 6e 74 69 63 61 74 69 | 6f 6e 20 6f 66 20 70 6f |enticati|on of po|
|00000560| 73 73 69 62 6c 65 20 70 | 61 72 74 6e 65 72 73 20 |ssible p|artners |
|00000570| 7d 0d 0d 63 6f 6e 73 74 | 0d 09 6e 6c 56 65 72 73 |}..const|..nlVers|
|00000580| 69 6f 6e 09 3d 20 2d 33 | 31 31 30 30 3b 09 7b 20 |ion.= -3|1100;.{ |
|00000590| 2d 2d 20 6e 6f 20 61 70 | 70 6c 65 74 61 6c 6b 20 |-- no ap|pletalk |
|000005a0| 76 65 72 73 69 6f 6e 20 | 34 38 20 6f 72 20 68 69 |version |48 or hi|
|000005b0| 67 68 65 72 2c 20 63 6f | 75 6c 64 20 62 65 20 72 |gher, co|uld be r|
|000005c0| 65 6d 6f 76 65 64 20 7d | 0d 09 6e 6c 54 61 73 6b |emoved }|..nlTask|
|000005d0| 45 72 72 09 3d 20 2d 33 | 31 31 30 33 3b 20 09 7b |Err.= -3|1103; .{|
|000005e0| 20 2d 2d 20 72 6f 75 74 | 69 6e 65 73 20 63 61 6c | -- rout|ines cal|
|000005f0| 6c 65 64 20 69 6e 20 77 | 72 6f 6e 67 20 6f 72 64 |led in w|rong ord|
|00000600| 65 72 20 7d 0d 09 6e 6c | 4e 6f 74 46 6f 75 6e 64 |er }..nl|NotFound|
|00000610| 09 3d 20 2d 33 31 31 30 | 34 3b 20 09 7b 20 2d 2d |.= -3110|4; .{ --|
|00000620| 20 75 73 65 64 20 69 6e | 74 65 72 6e 61 6c 6c 79 | used in|ternally|
|00000630| 20 7d 0d 09 6e 6c 44 75 | 70 52 65 67 09 3d 20 2d | }..nlDu|pReg.= -|
|00000640| 33 31 31 30 35 3b 20 09 | 7b 20 2d 2d 20 63 61 6c |31105; .|{ -- cal|
|00000650| 6c 65 64 20 4e 6c 52 65 | 67 69 73 74 65 72 20 74 |led NlRe|gister t|
|00000660| 77 69 63 65 20 7d 0d 09 | 6e 6c 4e 6f 52 65 67 09 |wice }..|nlNoReg.|
|00000670| 09 3d 20 2d 33 31 31 30 | 36 3b 20 09 7b 20 2d 2d |.= -3110|6; .{ --|
|00000680| 20 63 61 6c 6c 65 64 20 | 4e 6c 44 65 72 65 67 69 | called |NlDeregi|
|00000690| 73 74 65 72 20 77 69 74 | 68 6f 75 74 20 4e 6c 52 |ster wit|hout NlR|
|000006a0| 65 67 69 73 74 65 72 20 | 7d 0d 09 6e 6c 41 74 6b |egister |}..nlAtk|
|000006b0| 4f 66 66 45 72 72 20 3d | 20 2d 33 31 31 30 38 3b |OffErr =| -31108;|
|000006c0| 09 7b 20 2d 2d 20 61 70 | 70 6c 65 74 61 6c 6b 20 |.{ -- ap|pletalk |
|000006d0| 6f 66 66 2c 20 63 61 6e | 6e 6f 74 20 75 73 65 20 |off, can|not use |
|000006e0| 66 75 6e 63 74 69 6f 6e | 20 7d 0d 0d 0d 09 6e 6c |function| }....nl|
|000006f0| 4c 6f 63 61 6c 09 09 3d | 20 30 3b 09 7b 20 63 61 |Local..=| 0;.{ ca|
|00000700| 6e 20 62 65 20 75 73 65 | 64 20 69 6e 73 74 65 61 |n be use|d instea|
|00000710| 64 20 6f 66 20 6c 6f 63 | 61 6c 20 74 6f 20 64 65 |d of loc|al to de|
|00000720| 6e 6f 74 65 20 74 68 69 | 73 20 6d 61 63 68 69 6e |note thi|s machin|
|00000730| 65 20 7d 0d 09 6e 6c 42 | 72 6f 61 64 63 61 73 74 |e }..nlB|roadcast|
|00000740| 09 3d 20 2d 31 3b 09 7b | 20 62 72 61 64 63 61 73 |.= -1;.{| bradcas|
|00000750| 74 20 61 64 64 72 65 73 | 73 2c 20 61 6c 6c 20 6f |t addres|s, all o|
|00000760| 66 20 74 68 69 73 20 63 | 61 62 6c 65 20 7d 0d 09 |f this c|able }..|
|00000770| 0d 66 75 6e 63 74 69 6f | 6e 20 4e 6c 4e 6f 64 65 |.functio|n NlNode|
|00000780| 20 3a 20 6c 6f 6e 67 69 | 6e 74 3b 0d 0d 7b 24 49 | : longi|nt;..{$I|
|00000790| 46 43 20 4e 6c 43 6c 69 | 65 6e 74 7d 0d 0d 0d 66 |FC NlCli|ent}...f|
|000007a0| 75 6e 63 74 69 6f 6e 20 | 4e 6c 53 65 74 53 65 61 |unction |NlSetSea|
|000007b0| 72 63 68 20 28 4e 6c 4e | 61 6d 65 2c 20 4e 6c 54 |rch (NlN|ame, NlT|
|000007c0| 79 70 65 2c 20 4e 6c 5a | 6f 6e 65 20 3a 20 53 74 |ype, NlZ|one : St|
|000007d0| 72 33 32 29 20 3a 20 4f | 53 45 72 72 3b 0d 0d 7b |r32) : O|SErr;..{|
|000007e0| 09 73 74 61 72 74 2f 73 | 74 6f 70 20 6f 66 20 4e |.start/s|top of N|
|000007f0| 4c 20 74 61 73 6b 20 7d | 0d 0d 66 75 6e 63 74 69 |L task }|..functi|
|00000800| 6f 6e 20 4e 6c 53 74 61 | 72 74 20 3a 20 4f 53 45 |on NlSta|rt : OSE|
|00000810| 72 72 3b 0d 66 75 6e 63 | 74 69 6f 6e 20 4e 6c 53 |rr;.func|tion NlS|
|00000820| 74 6f 70 20 3a 20 4f 53 | 45 72 72 3b 0d 0d 66 75 |top : OS|Err;..fu|
|00000830| 6e 63 74 69 6f 6e 20 4e | 6c 43 6f 75 6e 74 20 3a |nction N|lCount :|
|00000840| 20 69 6e 74 65 67 65 72 | 3b 09 7b 20 6f 72 20 4f | integer|;.{ or O|
|00000850| 53 45 72 72 2c 20 69 66 | 20 65 72 72 6f 72 2c 20 |SErr, if| error, |
|00000860| 4e 6c 43 6f 75 6e 74 20 | 72 65 74 75 72 6e 73 20 |NlCount |returns |
|00000870| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 70 61 |the numb|er of pa|
|00000880| 72 74 6e 65 72 73 20 66 | 6f 75 6e 64 2e 20 7d 0d |rtners f|ound. }.|
|00000890| 66 75 6e 63 74 69 6f 6e | 20 4e 4c 41 63 74 69 76 |function| NLActiv|
|000008a0| 65 20 28 77 68 6f 3a 6c | 6f 6e 67 69 6e 74 29 20 |e (who:l|ongint) |
|000008b0| 3a 20 62 6f 6f 6c 65 61 | 6e 3b 09 7b 20 69 73 20 |: boolea|n;.{ is |
|000008c0| 77 68 6f 20 73 74 69 6c | 6c 20 6f 6e 20 74 68 65 |who stil|l on the|
|000008d0| 20 6c 69 73 74 20 3f 20 | 7d 0d 66 75 6e 63 74 69 | list ? |}.functi|
|000008e0| 6f 6e 20 4e 4c 52 61 6e | 64 6f 6d 20 3a 20 6c 6f |on NLRan|dom : lo|
|000008f0| 6e 67 69 6e 74 3b 20 7b | 20 61 6e 79 20 70 61 72 |ngint; {| any par|
|00000900| 74 6e 65 72 2e 20 72 65 | 74 75 72 6e 73 20 30 20 |tner. re|turns 0 |
|00000910| 6f 6e 20 65 72 72 6f 72 | 2e 7d 0d 66 75 6e 63 74 |on error|.}.funct|
|00000920| 69 6f 6e 20 4e 4c 4e 65 | 78 74 28 61 66 74 65 72 |ion NLNe|xt(after|
|00000930| 3a 6c 6f 6e 67 69 6e 74 | 29 20 3a 20 6c 6f 6e 67 |:longint|) : long|
|00000940| 69 6e 74 3b 09 7b 20 6e | 65 78 74 20 70 61 72 74 |int;.{ n|ext part|
|00000950| 6e 65 72 2e 20 4e 4c 4e | 65 78 74 28 30 29 20 72 |ner. NLN|ext(0) r|
|00000960| 65 74 72 75 72 6e 73 20 | 66 69 72 73 74 2e 20 72 |etrurns |first. r|
|00000970| 65 74 75 72 6e 73 20 30 | 20 6f 6e 20 65 72 72 6f |eturns 0| on erro|
|00000980| 72 2e 20 7d 0d 66 75 6e | 63 74 69 6f 6e 20 4e 6c |r. }.fun|ction Nl|
|00000990| 54 61 73 6b 20 3a 20 4f | 53 45 72 72 3b 09 09 7b |Task : O|SErr;..{|
|000009a0| 20 63 61 6c 6c 20 74 68 | 69 73 20 66 75 6e 63 74 | call th|is funct|
|000009b0| 69 6f 6e 20 70 65 72 69 | 6f 64 69 63 61 6c 6c 79 |ion peri|odically|
|000009c0| 20 7d 0d 66 75 6e 63 74 | 69 6f 6e 20 4e 6c 47 65 | }.funct|ion NlGe|
|000009d0| 74 53 6c 65 65 70 20 3a | 20 6c 6f 6e 67 69 6e 74 |tSleep :| longint|
|000009e0| 3b 09 09 7b 20 74 69 6d | 65 20 74 68 61 74 20 6d |;..{ tim|e that m|
|000009f0| 61 79 20 65 6c 61 70 73 | 65 20 75 6e 74 69 6c 20 |ay elaps|e until |
|00000a00| 6e 65 78 74 20 63 61 6c | 6c 20 74 6f 20 4e 6c 54 |next cal|l to NlT|
|00000a10| 61 73 6b 20 20 7d 0d 0d | 7b 24 45 4e 44 43 7d 0d |ask }..|{$ENDC}.|
|00000a20| 0d 7b 24 49 46 43 20 4e | 6c 53 65 72 76 65 72 7d |.{$IFC N|lServer}|
|00000a30| 0d 0d 7b 09 72 65 67 69 | 73 74 65 72 20 61 20 73 |..{.regi|ster a s|
|00000a40| 65 72 76 65 72 2c 20 70 | 61 73 73 20 27 27 20 74 |erver, p|ass '' t|
|00000a50| 6f 20 75 73 65 20 63 68 | 6f 6f 73 65 72 6e 61 6d |o use ch|oosernam|
|00000a60| 65 2c 20 6f 6e 6c 79 20 | 6f 6e 65 20 65 6e 74 69 |e, only |one enti|
|00000a70| 74 79 20 63 61 6e 20 62 | 65 20 72 65 67 69 73 74 |ty can b|e regist|
|00000a80| 65 72 65 64 20 7d 0d 0d | 66 75 6e 63 74 69 6f 6e |ered }..|function|
|00000a90| 20 4e 6c 52 65 67 69 73 | 74 65 72 20 28 4e 6c 4e | NlRegis|ter (NlN|
|00000aa0| 61 6d 65 2c 20 4e 6c 54 | 79 70 65 20 3a 20 53 74 |ame, NlT|ype : St|
|00000ab0| 72 33 32 29 20 3a 20 4f | 53 45 72 72 3b 0d 66 75 |r32) : O|SErr;.fu|
|00000ac0| 6e 63 74 69 6f 6e 20 4e | 6c 44 65 72 65 67 69 73 |nction N|lDeregis|
|00000ad0| 74 65 72 20 3a 20 4f 53 | 45 72 72 3b 0d 0d 7b 24 |ter : OS|Err;..{$|
|00000ae0| 45 4e 44 43 7d 0d 0d 66 | 75 6e 63 74 69 6f 6e 20 |ENDC}..f|unction |
|00000af0| 4e 6c 49 6e 69 74 20 3a | 20 4f 53 45 72 72 3b 0d |NlInit :| OSErr;.|
|00000b00| 0d 7b 20 74 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |.{ this |function|
|00000b10| 20 69 73 20 6f 62 73 6f | 6c 65 74 65 20 61 6e 64 | is obso|lete and|
|00000b20| 20 73 68 6f 75 6c 64 20 | 6e 6f 20 6c 6f 6e 67 65 | should |no longe|
|00000b30| 72 20 62 65 20 75 73 65 | 64 2e 0d 66 75 6e 63 74 |r be use|d..funct|
|00000b40| 69 6f 6e 20 4e 6c 45 78 | 69 74 20 3a 20 4f 53 45 |ion NlEx|it : OSE|
|00000b50| 72 72 3b 0d 7d 0d 0d 69 | 6d 70 6c 65 6d 65 6e 74 |rr;.}..i|mplement|
|00000b60| 61 74 69 6f 6e 0d 0d 0d | 7b 09 3d 3d 3d 3d 3d 3d |ation...|{.======|
|00000b70| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000b80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000b90| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000ba0| 3d 3d 3d 3d 3d 3d 3d 09 | 7d 0d 0d 7b 09 6e 61 6d |=======.|}..{.nam|
|00000bb0| 65 20 6c 6f 6f 6b 75 70 | 20 2d 20 69 64 65 6e 74 |e lookup| - ident|
|00000bc0| 69 63 61 74 69 6f 6e 20 | 6f 66 20 70 6f 73 73 69 |ication |of possi|
|00000bd0| 62 6c 65 20 70 61 72 74 | 6e 65 72 73 20 7d 0d 0d |ble part|ners }..|
|00000be0| 7b 20 74 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |{ this f|unction |
|00000bf0| 72 65 74 75 72 6e 73 20 | 30 20 69 66 20 61 70 70 |returns |0 if app|
|00000c00| 6c 65 74 61 6c 6b 20 69 | 73 20 64 6f 77 6e 20 6f |letalk i|s down o|
|00000c10| 72 20 64 72 69 76 65 72 | 2f 61 70 70 6c 65 74 61 |r driver|/appleta|
|00000c20| 6c 6b 20 74 72 61 6e 73 | 70 6f 72 74 20 6e 6f 74 |lk trans|port not|
|00000c30| 20 69 6e 73 74 61 6c 6c | 65 64 20 7d 0d 0d 66 75 | install|ed }..fu|
|00000c40| 6e 63 74 69 6f 6e 20 4e | 6c 4e 6f 64 65 20 3a 20 |nction N|lNode : |
|00000c50| 6c 6f 6e 67 69 6e 74 3b | 0d 62 65 67 69 6e 0d 09 |longint;|.begin..|
|00000c60| 4e 6c 4e 6f 64 65 20 3a | 3d 20 30 3b 0d 65 6e 64 |NlNode :|= 0;.end|
|00000c70| 3b 0d 0d 7b 24 49 46 43 | 20 4e 6c 53 65 72 76 65 |;..{$IFC| NlServe|
|00000c80| 72 7d 0d 0d 66 75 6e 63 | 74 69 6f 6e 20 4e 6c 52 |r}..func|tion NlR|
|00000c90| 65 67 69 73 74 65 72 20 | 3a 20 4f 53 45 72 72 3b |egister |: OSErr;|
|00000ca0| 0d 62 65 67 69 6e 0d 09 | 4e 6c 52 65 67 69 73 74 |.begin..|NlRegist|
|00000cb0| 65 72 3a 3d 6e 6f 45 72 | 72 3b 0d 65 6e 64 3b 0d |er:=noEr|r;.end;.|
|00000cc0| 0d 66 75 6e 63 74 69 6f | 6e 20 4e 6c 44 65 72 65 |.functio|n NlDere|
|00000cd0| 67 69 73 74 65 72 20 3a | 20 4f 53 45 72 72 3b 0d |gister :| OSErr;.|
|00000ce0| 62 65 67 69 6e 0d 09 4e | 6c 44 65 72 65 67 69 73 |begin..N|lDeregis|
|00000cf0| 74 65 72 3a 3d 6e 6f 45 | 72 72 3b 0d 65 6e 64 3b |ter:=noE|rr;.end;|
|00000d00| 0d 7b 24 45 4e 44 43 7d | 0d 0d 7b 24 49 46 43 20 |.{$ENDC}|..{$IFC |
|00000d10| 4e 6c 43 6c 69 65 6e 74 | 7d 0d 66 75 6e 63 74 69 |NlClient|}.functi|
|00000d20| 6f 6e 20 4e 6c 53 65 74 | 53 65 61 72 63 68 20 28 |on NlSet|Search (|
|00000d30| 4e 6c 4e 61 6d 65 2c 20 | 4e 6c 54 79 70 65 2c 20 |NlName, |NlType, |
|00000d40| 4e 6c 5a 6f 6e 65 20 3a | 20 53 74 72 33 32 29 20 |NlZone :| Str32) |
|00000d50| 3a 20 4f 53 45 72 72 3b | 0d 7b 74 72 69 76 69 61 |: OSErr;|.{trivia|
|00000d60| 6c 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |l implem|entation|
|00000d70| 20 63 68 65 63 6b 73 20 | 77 68 65 74 68 65 72 20 | checks |whether |
|00000d80| 70 61 72 61 6d 65 74 65 | 72 73 20 63 6f 72 72 65 |paramete|rs corre|
|00000d90| 73 70 6f 6e 64 20 74 6f | 20 64 65 66 61 75 6c 74 |spond to| default|
|00000da0| 73 20 3d 0d 27 3d 3a 4e | 65 74 77 6f 72 6b 20 50 |s =.'=:N|etwork P|
|00000db0| 72 6f 63 65 73 73 6f 72 | 40 2a 27 20 7d 0d 62 65 |rocessor|@*' }.be|
|00000dc0| 67 69 6e 0d 09 69 66 20 | 28 4e 6c 4e 61 6d 65 3c |gin..if |(NlName<|
|00000dd0| 3e 27 3d 27 29 20 7c 20 | 28 4e 6c 54 79 70 65 3c |>'=') | |(NlType<|
|00000de0| 3e 20 27 4e 65 74 77 6f | 72 6b 20 50 72 6f 63 65 |> 'Netwo|rk Proce|
|00000df0| 73 73 6f 72 27 29 20 7c | 20 28 4e 6c 5a 6f 6e 65 |ssor') || (NlZone|
|00000e00| 20 3c 3e 27 2a 27 29 0d | 09 74 68 65 6e 20 7b 6e | <>'*').|.then {n|
|00000e10| 6f 74 20 64 65 66 61 75 | 6c 74 20 73 65 61 72 63 |ot defau|lt searc|
|00000e20| 68 20 74 61 72 67 65 74 | 7d 0d 09 09 4e 6c 53 65 |h target|}...NlSe|
|00000e30| 74 53 65 61 72 63 68 20 | 3a 3d 20 6e 6c 4e 6f 74 |tSearch |:= nlNot|
|00000e40| 46 6f 75 6e 64 20 7b 65 | 72 72 6f 72 20 63 6f 64 |Found {e|rror cod|
|00000e50| 65 20 72 65 63 79 63 6c | 65 64 7d 0d 09 65 6c 73 |e recycl|ed}..els|
|00000e60| 65 0d 09 09 4e 6c 53 65 | 74 53 65 61 72 63 68 20 |e...NlSe|tSearch |
|00000e70| 3a 3d 20 6e 6f 45 72 72 | 3b 0d 65 6e 64 3b 0d 09 |:= noErr|;.end;..|
|00000e80| 09 0d 0d 66 75 6e 63 74 | 69 6f 6e 20 4e 6c 53 74 |...funct|ion NlSt|
|00000e90| 61 72 74 20 3a 20 4f 53 | 45 72 72 3b 0d 62 65 67 |art : OS|Err;.beg|
|00000ea0| 69 6e 0d 09 20 4e 6c 53 | 74 61 72 74 20 3a 3d 20 |in.. NlS|tart := |
|00000eb0| 6e 6f 45 72 72 3b 20 0d | 65 6e 64 3b 0d 0d 66 75 |noErr; .|end;..fu|
|00000ec0| 6e 63 74 69 6f 6e 20 4e | 6c 53 74 6f 70 20 3a 20 |nction N|lStop : |
|00000ed0| 4f 53 45 72 72 3b 0d 62 | 65 67 69 6e 0d 09 4e 6c |OSErr;.b|egin..Nl|
|00000ee0| 53 74 6f 70 20 3a 3d 20 | 6e 6f 45 72 72 3b 0d 65 |Stop := |noErr;.e|
|00000ef0| 6e 64 3b 0d 0d 66 75 6e | 63 74 69 6f 6e 20 4e 6c |nd;..fun|ction Nl|
|00000f00| 43 6f 75 6e 74 20 3a 20 | 69 6e 74 65 67 65 72 3b |Count : |integer;|
|00000f10| 0d 62 65 67 69 6e 0d 09 | 4e 6c 43 6f 75 6e 74 20 |.begin..|NlCount |
|00000f20| 3a 3d 20 30 3b 0d 65 6e | 64 3b 0d 09 0d 66 75 6e |:= 0;.en|d;...fun|
|00000f30| 63 74 69 6f 6e 20 4e 4c | 41 63 74 69 76 65 28 77 |ction NL|Active(w|
|00000f40| 68 6f 3a 6c 6f 6e 67 69 | 6e 74 29 3a 62 6f 6f 6c |ho:longi|nt):bool|
|00000f50| 65 61 6e 3b 0d 62 65 67 | 69 6e 0d 09 4e 6c 41 63 |ean;.beg|in..NlAc|
|00000f60| 74 69 76 65 3a 3d 74 72 | 75 65 0d 65 6e 64 3b 0d |tive:=tr|ue.end;.|
|00000f70| 0d 66 75 6e 63 74 69 6f | 6e 20 4e 4c 52 61 6e 64 |.functio|n NLRand|
|00000f80| 6f 6d 3a 6c 6f 6e 67 69 | 6e 74 3b 0d 62 65 67 69 |om:longi|nt;.begi|
|00000f90| 6e 0d 09 09 4e 4c 52 61 | 6e 64 6f 6d 3a 3d 6e 6c |n...NLRa|ndom:=nl|
|00000fa0| 42 72 6f 61 64 63 61 73 | 74 3b 0d 65 6e 64 3b 0d |Broadcas|t;.end;.|
|00000fb0| 0d 66 75 6e 63 74 69 6f | 6e 20 4e 4c 4e 65 78 74 |.functio|n NLNext|
|00000fc0| 28 61 66 74 65 72 3a 6c | 6f 6e 67 69 6e 74 29 3a |(after:l|ongint):|
|00000fd0| 6c 6f 6e 67 69 6e 74 3b | 0d 76 61 72 20 73 63 72 |longint;|.var scr|
|00000fe0| 2c 4e 72 4f 74 68 65 72 | 73 3a 69 6e 74 65 67 65 |,NrOther|s:intege|
|00000ff0| 72 3b 0d 62 65 67 69 6e | 0d 09 09 4e 4c 4e 65 78 |r;.begin|...NLNex|
|00001000| 74 3a 3d 20 30 3b 0d 65 | 6e 64 3b 0d 0d 66 75 6e |t:= 0;.e|nd;..fun|
|00001010| 63 74 69 6f 6e 20 4e 6c | 54 61 73 6b 20 3a 20 4f |ction Nl|Task : O|
|00001020| 53 45 72 72 3b 09 09 7b | 20 63 61 6c 6c 20 74 68 |SErr;..{| call th|
|00001030| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 70 65 72 69 |is funct|ion peri|
|00001040| 6f 64 69 63 61 6c 6c 79 | 20 7d 0d 62 65 67 69 6e |odically| }.begin|
|00001050| 0d 09 4e 6c 54 61 73 6b | 3a 3d 4e 6f 45 72 72 3b |..NlTask|:=NoErr;|
|00001060| 0d 65 6e 64 3b 0d 0d 66 | 75 6e 63 74 69 6f 6e 20 |.end;..f|unction |
|00001070| 4e 6c 47 65 74 53 6c 65 | 65 70 20 3a 20 6c 6f 6e |NlGetSle|ep : lon|
|00001080| 67 69 6e 74 3b 09 09 7b | 20 74 69 6d 65 20 74 68 |gint;..{| time th|
|00001090| 61 74 20 6d 61 79 20 65 | 6c 61 70 73 65 20 75 6e |at may e|lapse un|
|000010a0| 74 69 6c 20 6e 65 78 74 | 20 63 61 6c 6c 20 74 6f |til next| call to|
|000010b0| 20 4e 6c 54 61 73 6b 20 | 20 7d 0d 62 65 67 69 6e | NlTask | }.begin|
|000010c0| 0d 09 4e 6c 47 65 74 53 | 6c 65 65 70 3a 3d 6d 61 |..NlGetS|leep:=ma|
|000010d0| 78 6c 6f 6e 67 69 6e 74 | 3b 0d 65 6e 64 3b 0d 0d |xlongint|;.end;..|
|000010e0| 7b 24 45 4e 44 43 7d 0d | 0d 7b 09 3d 3d 3d 3d 3d |{$ENDC}.|.{.=====|
|000010f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001100| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001110| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001120| 3d 3d 3d 3d 3d 3d 3d 3d | 09 7d 0d 0d 0d 66 75 6e |========|.}...fun|
|00001130| 63 74 69 6f 6e 20 4e 6c | 49 6e 69 74 20 3a 20 4f |ction Nl|Init : O|
|00001140| 53 45 72 72 3b 0d 62 65 | 67 69 6e 0d 09 4e 6c 49 |SErr;.be|gin..NlI|
|00001150| 6e 69 74 3a 3d 4e 6f 45 | 72 72 3b 0d 65 6e 64 3b |nit:=NoE|rr;.end;|
|00001160| 0d 0d 66 75 6e 63 74 69 | 6f 6e 20 4e 6c 45 78 69 |..functi|on NlExi|
|00001170| 74 20 3a 20 4f 53 45 72 | 72 3b 0d 62 65 67 69 6e |t : OSEr|r;.begin|
|00001180| 0d 09 4e 6c 45 78 69 74 | 3a 3d 4e 6f 45 72 72 3b |..NlExit|:=NoErr;|
|00001190| 0d 65 6e 64 3b 0d 0d 0d | 65 6e 64 2e 0d 00 00 00 |.end;...|end.....|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 00 00 01 00 00 00 01 9d | 00 00 00 9d 00 00 00 52 |........|.......R|
|00001210| 64 69 72 69 64 20 7d 0d | 09 09 67 45 72 72 6f 72 |dirid }.|..gError|
|00001220| 20 3a 3d 20 50 42 48 47 | 65 74 46 49 6e 66 6f 20 | := PBHG|etFInfo |
|00001230| 0f 54 72 69 76 69 61 6c | 4c 6f 6f 6b 55 70 2e 70 |.Trivial|LookUp.p|
|00001240| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 00 d0 |....TEXT|MPS ....|
|00001250| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 d0 01 00 |..TEXTMP|S ......|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 a3 be ff e6 00 00 | 11 1d 00 00 01 ef 64 72 |........|......dr|
|00001280| 49 6e 66 6f 2e 66 64 43 | 72 65 61 74 6f 72 29 3b |Info.fdC|reator);|
|00001290| 0d 09 69 66 20 67 45 72 | 72 6f 72 20 3d 20 6e 6f |..if gEr|ror = no|
|000012a0| 45 72 72 20 74 68 65 6e | 0d 09 09 69 66 20 70 53 |Err then|...if pS|
|000012b0| 69 67 6e 61 74 75 72 65 | 20 3d 20 30 20 74 68 65 |ignature| = 0 the|
|000012c0| 6e 20 67 45 72 72 6f 72 | 20 3a 3d 20 65 4e 6f 53 |n gError| := eNoS|
|000012d0| 69 67 6e 61 74 75 72 65 | 0d 09 09 65 6c 73 65 20 |ignature|...else |
|000012e0| 4d 73 67 49 6e 69 74 20 | 28 70 53 69 67 6e 61 74 |MsgInit |(pSignat|
|000012f0| 75 72 65 29 3b 0d 09 49 | 6e 69 74 4e 65 74 57 6f |ure);..I|nitNetWo|
|00001300| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 02 c8 |........|........|
|00001320| 7f f5 7f f5 00 00 00 06 | 00 04 00 2a 00 03 01 dd |........|...*....|
|00001330| 02 7d 00 29 00 07 01 6a | 01 3e a4 cc 53 69 00 00 |.}.)...j|.>..Si..|
|00001340| 0a 81 00 00 0a 81 00 00 | 09 a1 01 00 00 00 00 1e |........|........|
|00001350| 00 2a 00 03 01 dd 02 7d | 00 29 00 07 01 6a 01 3e |.*.....}|.)...j.>|
|00001360| 00 00 09 a1 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 2b 01 23 80 00 00 00 | 05 31 2e 32 2e 33 1e 31 |.+.#....|.1.2.3.1|
|00001380| 2e 32 2e 33 a9 31 39 39 | 31 54 68 65 20 4e 65 74 |.2.3.199|1The Net|
|00001390| 57 6f 72 6b 20 50 72 6f | 6a 65 63 74 20 00 00 01 |Work Pro|ject ...|
|000013a0| 00 00 00 01 9d 00 00 00 | 9d 00 00 00 52 00 48 3c |........|....R.H<|
|000013b0| 78 08 d2 00 00 00 1c 00 | 52 00 01 4d 50 53 52 00 |x.......|R..MPSR.|
|000013c0| 01 00 12 76 65 72 73 00 | 00 00 2a 03 ed ff ff 00 |...vers.|..*.....|
|000013d0| 00 00 00 00 00 00 00 03 | f0 ff ff 00 00 00 4c 00 |........|......L.|
|000013e0| 00 00 00 00 02 ff ff 20 | 00 00 6e 00 48 37 d0 00 |....... |..n.H7..|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+